<template >
    <view class="container">       
    <header>
      <a @click="$utils.gotopage('','back')" class="pa back"></a>
      <p>自定义配置</p>  

    </header>
    
    <div class="configInfo-wrap" v-show="ibshow" >
 
		<!--  swiper-item img  -->
		<div class="divselectBox divselectBox_w" v-if="divselectBrandShow">
			<div class="closebtn" data-showid="divselectBrandShow" @click="closeDivselect">X</div>
			<radio-group @change="radioChange" style=" padding-left:0.6rem;padding-bottom:.4rem" >
				<label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in divselectList" :key="item.id">
					<view>
						<radio :value="item.id+''" style="transform:scale(0.7)" :checked="radio_group_flex==1"  />{{item.name}}
					</view>
                </label>    
			</radio-group>						 	
    	</div>
		
		
		<!-- 主机配置 -->

		<div class="configInfo-li"  v-for="(item, index) in frmdata.category" :key="index"> 
		 
			<div class="flex-wrap-around config-other" v-for="(item2, index2) in item.detail" :key="index2">
				<span>{{ item2.catedetail_name }}</span> 			 
				<span style="background-color: #fbf8f8;"  >
					<div class="itemRow">
						<input  class="config-sel select_ct" v-model="vmodel_brands[''+item2.catedetail_id]"   :ref="'refbrands_'+item2.catedetail_id"  v-if="isbrandChange[''+item2.catedetail_id]"   disabled @click="divselectShow('brand',item2.catedetail_id)"   /> 						 
						<span class="ico_down"      @click="divselectShow('brand',item2.catedetail_id)" >▼</span>						 
					</div>
				 
					<div class="itemRow">						 
						<input  class="config-sel select_ct" v-model="vmodel_models[''+item2.catedetail_id]"   :ref="'refmodels_'+item2.catedetail_id"  v-if="ismodelChange[''+item2.catedetail_id]"  disabled @click="divselectShow('model',item2.catedetail_id)"   /> 						 
						<span class="ico_down" :data-catedetail_id="item2.catedetail_id"    @click="divselectShow('model',item2.catedetail_id)" >▼</span> 						 
					</div>
				</span>
      		</div>
		</div>

		<!-- 基础参数 -->
		<div class="configInfo-li" ref="configInfo-li">
			<div class="config-title flex-wrap-start">
				<span class="icon num">i</span>
				<span class="title">易损件</span>
			</div>
 			<button @click="closeEasyBtn" class="hide" >选择</button>

			<div class="flex-wrap-around config-other paralist" >
				<block  v-for="(item, index) in checkbox_easydamageList" :key="index"> 
				<dl style="display:flex;">
					<dd style="width: 20%;padding-right:10px;">{{item.easydamage_name}}</dd>
					<dd style="width: 75%;">{{item.description}}</dd>
			    </dl>
				</block>
			</div>
 
			<div v-if="easydamageShow" class="divselectBox" >
				<div class="closebtn" data-showid="divselectBrandShow" @click="closeEasyBtn">X</div>
				<checkbox-group   @change="checkEasyChange" >		 
					<label class="uni-list-cell uni-list-cell-pd" v-for="item in easydamageList" :key="item.ed_id" :data-ed_id="item.ed_id">
						<view style="display: flex; flex-direction: row;">
							<checkbox   :value="item.ed_id+''" :data-eid="item.ed_id" :checked="item.checked" style="transform:scale(0.7)"></checkbox>
								<dd >{{item.easydamage_name}}</dd>
								<dd >:{{item.description}}</dd>
							
						</view>								 
					</label>							
				</checkbox-group>
			</div>

		</div> 

 
		<div class="configInfo-li" ref="configInfo-li">
			<div class="config-title flex-wrap-start">
				<span class="icon num">i</span>
				<span class="title">延保项</span>
			</div>
			
			<div class="flex-wrap-around config-other paralist" >
				<input v-model="vmodel_delayinsurance" class="config-sel" ref="refdelayinsurance"  disabled  placeholder="请选择" @click="divselectShow('delayinsurance',null)" />
				
				</block>
			</div>
		</div> 


		<!-- 基础参数 -->
		<div class="configInfo-li" ref="configInfo-li">
			<div class="config-title flex-wrap-start">
				<span class="icon num">i</span>
				<span class="title">基础参数</span>
			</div>
			
			<div class="flex-wrap-around config-other paralist" >
				<div v-html="param_subtab"></div>
			</div>
		</div> 

		<!-- 用户信息 -->
		<div class="configInfo-li" ref="configInfo-li">
			<div class="config-title flex-wrap-start">
				<span class="icon num">i</span>
				<span class="title">用户信息</span>
			</div>
			<div class="flex-wrap-around config-other">				
				<span>公司名称</span> 
				<span><input  v-model="add.company" type="text" placeholder="请输入您的公司名称"></span>
			</div>
			<div class="flex-wrap-around config-other">				
				<span>联系人</span> 
				<span><input v-model="add.contacts" class="contacts" type="text" placeholder="请输入联系人"></span>
			</div>
			<div class="flex-wrap-around config-other">
				
				<span>联系电话</span> 
				<span><input v-model="add.telephone" class="telephone" type="text" placeholder="请输入联系电话"></span>
			</div>

			<div class="flex-wrap-around config-other">
				<span>地址</span>
				<span><input v-model="add.address" class="address" type="text" placeholder="请输入地址"></span>
			</div>

			<div class="flex-wrap-around config-other">
				<span>所属行业</span>
				<span>
					<input v-model="vmodel_industry" class="config-sel"   ref="refindustry" disabled placeholder="请选择行业" @click="divselectShow('industry',null)" />
				</span>
			</div>

			<div class="flex-wrap-around config-other">
				<span>付款方式</span>
				<span>
					<input v-model="vmodel_payment" class="config-sel"   ref="refpayment" disabled placeholder="付款方式" @click="divselectShow('payment',null)" />					
				</span>
			</div>

			<textarea placeholder="备注" class="remarks config-bz" v-model="add.remarks"></textarea>
		</div>




		 
    </div>  
	
	<!-- ======= 报价页面 ====================================== -->
  
			<div class="price-btn-wrap flex-wrap-around pa" style="    flex-direction: column;">
				<div style="display: block; clear: both; width: 100%; ">
				<span>总计：</span>
				<span>￥{{totalprice}}</span>
				</div>
				<div style="display: block; clear: both; width: 100%;text-align: center;">
 
        			<span class="btn" @click="nfenter">保存方案</span>
				</div>
      		</div>

</view>

</template>
 
<script>
var mySelf;

    export default {
        data() {
            return {
				frmdata:{
					category:[]
				},
				sel_options:[],
				dynamic_brand:[],
				modelDblist:[],
				parameterlist:[],
				easydamageList:[],
				checkbox_easydamageList:[],
				delayinsuranceList:[],
				add:{
					company:'',
					contacts:'',
					telephone:'',
					address:'',
					payment_id:'',
					industry_id:'',
					delay_id:''
				},
				hyList:{},
				paymentList:{},
				autoplay: true,
            	interval: 2000,
				duration: 500,
				seriesinfo:[],
				swiperimages:[],
				ibshow:1,				 
				totalprice:0,
				///
				options:[],
			 	param_subtab:'',
				easydamageShow:false,
				inited:0,
				deivceList:{},
				modelList:{},
				divselectBrandShow:0,
				divselectList:[],
				divselectBoxType:'',
				currentCatedetail_id : '',
				currentBrand_id:'', 
				vmodel_brands:{},
			 	vmodel_models:{},
				isbrandChange:{},
				ismodelChange:{},   //刷新用
				vmodel_delayinsurance:'',
				vmodel_industry:'',
				vmodel_payment:'',
				radio_group_flex:0,
				devid_arr:[]
			}
		},
	    beforeCreate() {
			this.$myUtils.isLoginGotoPage();	
		},
		onLoad(options) {			
			this.options = options;
        },
        mounted() {			 
			this.gettree();
			this.getHy();
			this.getPayment();
		},
		created() {
			mySelf = this;
			for (let index = 0; index < 100; index++) {
				this.$set(this.isbrandChange,index,1);
				this.$set(this.ismodelChange,index,1);
			}
		},
        methods: {			 
			gettree:function () {	
				uni.showToast({
							title: '正在加载数据',
							icon:'loading',
							duration:800
						});		
				let _url = '/category/getconfigInfo'
 
 
				this.$myUtils.myRequest({	
					url: _url,
					data:{'user_id':mySelf.$myUtils.getStorage('userId'),'device_id':mySelf.options.device_id},
					method:'post'
				}).then(res => {				
					mySelf.frmdata.category = res.data.req.datalist.cate; 				 
					//mySelf.deivceList = JSON.parse(JSON.stringify(res.data.req.datalist.deivceList))  ;	
					mySelf.modelList = JSON.parse(JSON.stringify(res.data.req.datalist.modelList))  ;			
				 	mySelf.seriesinfo = res.data.req.seriesinfo; 
				//	mySelf.swiperimages =  res.data.req.seriesinfo.series_img ;
					mySelf.easydamageList = res.data.req.datalist.easydamageList;
					mySelf.delayinsuranceList = res.data.req.datalist.delayinsuranceList;
					mySelf.inited = 1;	

				})	
			},
			getHy:function() {
				this.$myUtils.myRequest({
					url: '/Industry/index',
				}).then(res => {					 
					mySelf.hyList = res.data.data.list; 
				 
				})	
			},
			getPayment:function() {			 
				this.$myUtils.myRequest({
					url: '/Paytype/index',
				}).then(res => {					 
					mySelf.paymentList = res.data.data.list; 
				 
				})
			},	
			totalconfig:function() {
				let _total_price = 0;
				for (const $ref in this.$refs) {
					console.log($ref);
					if ($ref.includes('refbrands_')) {	
						let $arr = $ref.split("_")
						let _t2 = mySelf._addPrice($arr[1])
						_total_price += _t2;
					}
				}

				mySelf.totalprice = _total_price.toFixed(0); 

				let _param_subtab = '<div class="param_subtab">';
				
				for (const $param in mySelf.parameterlist) {
					let _str = ''
					for (const k in mySelf.parameterlist[$param]) {						 
						_str += k +":"+ mySelf.parameterlist[$param][k]

					}
					_param_subtab += '<ul><li>'+$param+"</li>"+'<li>'+ _str+"</li></ul>"
				}
			 
				mySelf.param_subtab = _param_subtab;
				return false;
			},	
			isbrandsInput:function(refkey) {
				let $input;
				if (mySelf.$refs[refkey][0].disabled==true) {
					//谷歌浏览器上运行代码
					$input = mySelf.$refs[refkey][0].$refs.input;
				} else {
					//手机端运行代码
					$input = mySelf.$refs[refkey][0] ;
				}				
				return $input;
			},
			_addPrice:function(catedetail_id) {
				let _brand_id = mySelf.isbrandsInput("refbrands_"+catedetail_id).dataset.brand_id;
				let _model_id = mySelf.isbrandsInput("refmodels_"+catedetail_id).dataset.model_id;
				 
				if (_brand_id<0 || _model_id<0) {
					return false;
				}

				let _total_price2 = 0;
				for (const $k in mySelf.modelList) {
					const _de = mySelf.modelList[$k]
					for (const $kk in _de) {
						const _de2 = _de[$kk]
						if (_de2.brand_id == _brand_id && _de2.model_id == _model_id) {
							_total_price2 = mySelf.$myUtils.floatAdd(_total_price2,_de2.price?_de2.price:0);
							
							if (_de2.param) mySelf.$set(mySelf.parameterlist,catedetail_id,JSON.parse(_de2.param))
							mySelf.devid_arr.push({'catedetail_id':catedetail_id,'brand_id':_de2.brand_id,'model_id':_de2.model_id})
							return _total_price2;
						}
					}

				}
				return 0;
							
			},
			nfenter:function() {
				
				if ( mySelf.checkbox_easydamageList.length==0)  {
					return uni.showToast({
							title: '错误，请输入易损件',
							icon:'none',
							duration:1000
                        });
				}

				if (mySelf.isInputObj('refdelayinsurance').dataset.delay_id ==undefined) {
					return uni.showToast({
							title: '错误，请输入延保项',
							icon:'none',
							duration:1000
                        });
				}
				
				
				if (!mySelf.add['company']) {
					return uni.showToast({
							title: '错误，请输入公司名称',
							icon:'none',
							duration:1000
                    });
				}

				if (!mySelf.add['contacts']) {
					return uni.showToast({
							title: '错误，请输入联系人',
							icon:'none',
							duration:1000
                    });
				}

				if (!mySelf.add['telephone']) {
					return uni.showToast({
							title: '错误，请输入电话',
							icon:'none',
							duration:1000
                    });
				}

				if (!mySelf.$myUtils.isMobilePhone(mySelf.add['telephone'])) {
					return uni.showToast({
							title: '错误，请输入正确的手机号',
							icon:'none',
							duration:1000
                    });
				}
 
				
				if (mySelf.devid_arr.length==0)  {
					return uni.showToast({
							title: '错误，请选择值',
							icon:'none',
							duration:1000
                        });
				}

				let _data = {}
			 
				_data['devids_string'] = mySelf.devid_arr;				 
				_data['company'] = mySelf.add['company'];
				_data['contacts'] = mySelf.add['contacts'];
				_data['telephone'] = mySelf.add['telephone'];
				_data['address'] = mySelf.add['address'];
		
				let $input;				
				_data['delay_id'] = mySelf.isInputObj('refdelayinsurance').dataset.delay_id; //延保项
				_data['industry_id'] = mySelf.isInputObj('refindustry').dataset.ind_id;   //所属行业
				_data['payment_id'] = mySelf.isInputObj('refpayment').dataset.pt_id;   //付款方式

				if (_data['delay_id'] == undefined) {
					return uni.showToast({
							title: '错误，请选择延保项',
							icon:'none',
							duration:1000
                        });
				}

				if (_data['industry_id'] == undefined ) {
					return uni.showToast({
							title: '错误，请选择所属行业',
							icon:'none',
							duration:1000
                        });
				}

				if (_data['payment_id'] == undefined) {
					return uni.showToast({
							title: '错误，请选择付款方式',
							icon:'none',
							duration:1000
                        });
				}

				_data['remarks'] = mySelf.add['remarks'];
				_data['user_id'] = mySelf.$myUtils.getStorage('userId');
				_data['device_id'] = this.options.device_id;
				_data['totalprice'] = mySelf.totalprice;
				_data['easydamageList'] = mySelf.checkbox_easydamageList;
				_data['ibcustom'] = 1;
				console.log("postdata==",_data);

				let _url = '';
				// this.options.cpackage_id 这个不可能有，本页面只用于新增与后台用户配置不一样的数据。
				 
				_url = '/Customer/add'
 				uni.showToast({
							title: '正在...',
							icon:'loading',
							duration:500
				});

				this.$myUtils.myRequest({
					url: _url,
					data:_data,
					method:'post'
				}).then(res => {		
 					if (res.data.status==200) {
						if (res.statusCode==200) {
							if (res.data.status==200) {
								mySelf.$myUtils.successGotoUrl("reload",'成功提交') 
							}
						} 
					}					
				})	
			} ,
			checkEasyChange(e){
		
				mySelf.checkbox_easydamageList = {};
				let index = 0;
				   e.target.value.find((v,index)=>{ 				   		
				   		mySelf.easydamageList.find((v2,i2)=>{
				   			if (v2.ed_id==v) {
				   				 
				   				mySelf.$set(mySelf.checkbox_easydamageList,index++,v2);
				   			}
				   		})
				   })
			    },
			closeEasyBtn(){
			      this.easydamageShow=!this.easydamageShow;
			},
			isInputObj(refkey) {
				let $input;	
				//let refkey = 'refindustry';
				if (mySelf.$refs[refkey].disabled==true) {
					//谷歌浏览器上运行代码
					$input = mySelf.$refs[refkey].$refs.input;
				} else {
					//手机端运行代码
					$input = mySelf.$refs[refkey] ;
				}
				return $input;
			},
			radioChange(evt) {

				let $type = mySelf.divselectBoxType ;
				switch (true) {
					case $type == 'brand'|| $type == 'model':						
						for (const $k in mySelf.modelList) {
							const _de = mySelf.modelList[$k]

							for (const $kk in _de) {
								const _de2 = _de[$kk]
								if (_de2.catedetail_id == mySelf.currentCatedetail_id ) {
									if ($type == 'brand') { 
										if (evt.target.value == _de2.brand_id) {
											let $input;	
											let x = 'refbrands_'+mySelf.currentCatedetail_id;
											if (mySelf.$refs[x][0].disabled==true) {
												//谷歌浏览器上运行代码
												$input = mySelf.$refs[x][0].$refs.input;
											} else {
												//手机端运行代码
												$input = mySelf.$refs[x][0] ;
											}
											$input.dataset.brand_id = _de2.brand_id;
											
											mySelf.$set(mySelf.vmodel_brands,mySelf.currentCatedetail_id,_de2.brand); 	 //修改双向值		
											//
											x = 'refmodels_'+mySelf.currentCatedetail_id;
											if (mySelf.$refs[x][0].disabled==true) {
												//谷歌浏览器上运行代码
												$input = mySelf.$refs[x][0].$refs.input;
											} else {
												//手机端运行代码
												$input = mySelf.$refs[x][0] ;
											}
											$input.dataset.model_id = -1;
											mySelf.$set(mySelf.vmodel_models,mySelf.currentCatedetail_id,'请选择'); 								
		
											this.divselectBrandShow = 0 ;	
											return false;
										}

									} 
									if($type =='model') {
										////model 
										if (evt.target.value == _de2.model_id) {
											let $input;	
											let x = 'refmodels_'+mySelf.currentCatedetail_id;
											if (mySelf.$refs[x][0].disabled==true) {
												//谷歌浏览器上运行代码
												$input = mySelf.$refs[x][0].$refs.input;
											} else {
												//手机端运行代码
												$input = mySelf.$refs[x][0] ;
											}
										 
											$input.dataset.model_id = _de2.model_id;	
											mySelf.$set(mySelf.vmodel_models,mySelf.currentCatedetail_id,_de2.modelname); 	 //修改双向值	 
											//将 brand也设一下											 
											x = 'refbrands_'+mySelf.currentCatedetail_id;
											if (mySelf.$refs[x][0].disabled==true) {
												//谷歌浏览器上运行代码
												$input = mySelf.$refs[x][0].$refs.input;
											} else {
												//手机端运行代码
												$input = mySelf.$refs[x][0] ;
											}
											$input.dataset.model_id = _de2.model_id;
											
											this.divselectBrandShow = 0 ;	
											mySelf.totalconfig()
											return false; 
										}
									}
									
								}
							} 
						} 
						break;
				    case  $type=='delayinsurance':
					
						for (const key in mySelf.delayinsuranceList) {
							if (mySelf.delayinsuranceList.hasOwnProperty(key)) {
								const el = mySelf.delayinsuranceList[key];
								if (el.delay_id == evt.target.value) {
									mySelf.vmodel_delayinsurance = el.delay_name;
									let $input;
									let o = "refdelayinsurance";
									 
									if (typeof mySelf.$refs[o].$refs == 'undefined') {
										//手机端运行代码
										$input = mySelf.$refs[o] ;
										
									}	else {
										//谷歌浏览器上运行代码
										$input = mySelf.$refs[o].$refs.input;
									}		 
									$input.dataset.delay_id = el.delay_id;
									this.divselectBrandShow = 0 ;
									break;
								}
								
							}
						}
					case $type=='industry':
					
						for (const key in mySelf.hyList) {
							if (mySelf.hyList.hasOwnProperty(key)) {
								const el = mySelf.hyList[key];
								if (el.ind_id == evt.target.value) {
									mySelf.vmodel_industry = el.ind_name;
									let $input;
									let o = "refindustry";							
									 
									if (typeof mySelf.$refs[o].$refs == 'undefined') {
										//手机端运行代码
										$input = mySelf.$refs[o] ;
										
									}	else {
										//谷歌浏览器上运行代码
										$input = mySelf.$refs[o].$refs.input;
									}	
									 
									$input.dataset.ind_id = el.ind_id;
									this.divselectBrandShow = 0 ;
									break;
								}
								
							}
						}

					case $type=='payment':
					 
						for (const key in  mySelf.paymentList) {
							if ( mySelf.paymentList.hasOwnProperty(key)) {
								const el =  mySelf.paymentList[key];
								if (el.pt_id == evt.target.value) {
									mySelf.vmodel_payment =el.pay_name+ ' 折扣：'+ el.discount 
									let $input;
									let o = "refpayment";
									 
									if (typeof mySelf.$refs[o].$refs == 'undefined') {
										//手机端运行代码
										$input = mySelf.$refs[o] ;
										
									}	else {
										//谷歌浏览器上运行代码
										$input = mySelf.$refs[o].$refs.input;
									}
									 
									$input.dataset.pt_id = el.pt_id;
									this.divselectBrandShow = 0 ;
									break;
								}
								
							}
						}

					default:
						break;
				}		 
				
			},
			closeDivselect(e) {
				let showId = e.currentTarget.dataset.showid;
				this[showId] = 0 ;
			},
			divselectShow($type,$catedetail_id) { 			 
				this.divselectBrandShow = 1; 			
				if ($type == 'brand' || $type=='model') { 
					let barndList=[];
					let arrkey=[],arrval=[];
					for (const $k in mySelf.modelList[$catedetail_id]) {
						const _de = mySelf.modelList[$catedetail_id][$k]					  	 
								if ($type == 'brand') { 
									if (!arrkey.includes(_de.brand_id)) {
										arrkey.push(_de.brand_id)
										arrval.push(_de.brand)
									}
								} else {
									
									let $input;
									let k = 'refbrands_'+$catedetail_id;
									if (mySelf.$refs[k][0].disabled==true) {
											//谷歌浏览器上运行代码
 											$input = mySelf.$refs[k][0].$refs.input;
										} else {
											//手机端运行代码
 											$input = mySelf.$refs[k][0] ;
										}
									if ($input.dataset.brand_id ==_de.brand_id) {
										if (!arrkey.includes(_de.model_id)) {
											arrkey.push(_de.model_id)
											arrval.push(_de.modelname)	 	
										}
									}
									
								} 					 
					}
					mySelf.divselectList = [];
					mySelf.divselectBoxType = $type;
					mySelf.currentCatedetail_id = $catedetail_id;
					arrkey.forEach((v,i) => {
						mySelf.divselectList.push({'id':v,'name':arrval[i]})
					});
				}	
				///////////
				if ($type=='industry') {
					mySelf.divselectBoxType = $type;
					mySelf.divselectList = [];								 
					for (const key in mySelf.hyList) {
						const element = mySelf.hyList[key];
						// mySelf.$ref.industry.dataset. = ;
						mySelf.divselectList.push({'id':element.ind_id,'name':element.ind_name});
					}
				}
				///////
				if ($type=='delayinsurance') {
					mySelf.divselectBoxType = $type;		
					mySelf.divselectList = [];			 
					for (const key in mySelf.delayinsuranceList) {
						const element = mySelf.delayinsuranceList[key];
						// mySelf.$ref.industry.dataset. = ;
						mySelf.divselectList.push({'id':element.delay_id,'name':element.delay_name});
					}
				}
				///////
				if ($type=='industry') {
					mySelf.divselectBoxType = $type;
					mySelf.divselectList = [];			 
					for (const key in mySelf.hyList) {
						const element = mySelf.hyList[key];
						mySelf.divselectList.push({'id':element.ind_id,'name':element.ind_name});
					}
				}
				//vmodel_payment
				if ($type=='payment') {
					mySelf.divselectBoxType = $type;
					mySelf.divselectList = [];			 
					for (const key in mySelf.paymentList) {
						const element = mySelf.paymentList[key];
						mySelf.divselectList.push({'id':element.pt_id,'name':element.pay_name+' 折扣：'+ element.discount});
					}
				}
			},
			 

		},watch:{
			inited(val,oldval) {
				
				this.$nextTick(()=>{
					for (const k in this.$refs) {						
						if (k.includes("refbrands_") || k.includes("refmodels_")) {		
							let $targetCatedetail_id = k.replace(/[^0-9]/ig,"");
							//不从后台admin用户的配置取，从所有输入的模型取值
							for (const $k in mySelf.modelList) {
								const _de = mySelf.modelList[$k]
								for (const $kk in _de) {
									const _de2 = _de[$kk]
									if (_de2.catedetail_id == $targetCatedetail_id ) {				
										let $input;		
										if (mySelf.$refs[k][0].disabled==true) {
											//谷歌浏览器上运行代码
 											$input = mySelf.$refs[k][0].$refs.input;
										} else {
											//手机端运行代码
 											$input = mySelf.$refs[k][0] ;
										}
										 
										 
										if (k.includes("refbrands_")) {															$input.dataset.brand_id = _de2.brand_id;
											mySelf.$set(mySelf.vmodel_brands,$targetCatedetail_id,_de2.brand);			
											$input.dataset.catedetail_id = $targetCatedetail_id;
										}
										if (k.includes("refmodels_")) {
											$input.dataset.model_id = _de2.model_id;
											mySelf.$set(mySelf.vmodel_models,$targetCatedetail_id,_de2.modelname);
											$input.dataset.catedetail_id = $targetCatedetail_id;
										}
									}
								} 
							}							 
						} 
					}

					this.totalconfig();
					 
				})
				
			}
		} 
    }
</script>


<style>
.paralist {
	display: flex;
    flex-direction: column;
}
</style>